package com.study.modules.saas.repository.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.study.modules.saas.repository.enums.MenuCategory;
import com.study.modules.saas.repository.enums.MenuStatus;
import com.study.modules.saas.repository.enums.MenuType;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Data
@TableName("menu")
public class MenuDO {

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    private String name;

    @TableField(value = "parent_id")
    private Integer parentId;

    @TableField(value = "order_num")
    private Integer orderNum;

    private String path;

    private MenuCategory category;

    private MenuStatus status;

    private MenuType type;

    private String permission;

    @TableField(value = "created_by")
    private String createdBy;

    @TableField(value = "created_at")
    private Date createdAt;

    @TableField(value = "updated_by")
    private String updatedBy;

    @TableField(value = "updated_at")
    private Date updatedAt;

    @TableField(value = "deleted_by")
    private String deletedBy;

    @TableField(value = "deleted_at")
    private Date deletedAt;

    private String remark;


    @TableField(exist = false)
    private List<MenuDO> childList;

    @TableField(exist = false)
    private Boolean left;




}
